﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Text;
namespace Chizx.Web.clazz
{
    public partial class Show : Page
    {        
        		public string strid=""; 
		protected void Page_Load(object sender, EventArgs e)
                {
                    if (null == Session["UserEntity"])
                    {
                        Response.Redirect("/e/Login.aspx");
                    }
			if (!Page.IsPostBack)
			{
				int zc_id = -1;
				if (Request.Params["id0"] != null && Request.Params["id0"].Trim() != "")
				{
					zc_id=(Convert.ToInt32(Request.Params["id0"]));
				}
				int zm_id = -1;
				if (Request.Params["id1"] != null && Request.Params["id1"].Trim() != "")
				{
					zm_id=(Convert.ToInt32(Request.Params["id1"]));
				}
				#warning 代码生成提示：显示页面,请检查确认该语句是否正确
				ShowInfo(zc_id,zm_id);
			}
		}
		
	private void ShowInfo(int zc_id,int zm_id)
	{
		Chizx.BLL.ClazzBll bll=new Chizx.BLL.ClazzBll();
		Chizx.Model.ClazzModel model=bll.GetModel(zc_id,zm_id);
		this.lblzc_id.Text=model.zc_id.ToString();
		this.lblzm_id.Text=model.zm_id.ToString();
		this.lblzc_name.Text=model.zc_name;
		this.lblzc_createdate.Text=model.zc_createdate.ToString();
           //写入系统日志
           if (Session["UserEntity"] == null)
           {
               Response.Redirect("/e/Login.aspx");
           }
           else
           {
               Chizx.Model.UserModel sbmmodel = (Chizx.Model.UserModel)Session["UserEntity"];
               Chizx.BLL.SystemLogBll sbll = new Chizx.BLL.SystemLogBll();
               Chizx.Model.SystemLogModel slm = new Chizx.Model.SystemLogModel();
               slm.zu_id = sbmmodel.zu_id;
               slm.zl_dowhen = DateTime.Now;
               slm.zl_dowhat = "查看班级信息";
               slm.zl_dotype = "2";//0:Test,1:Auth,2:Read,3:Write,4:Del,5:Inpor
               slm.zl_dodesc = "操作成功";
               sbll.Add(slm);
           }
	}


    }
}
